package com.dd.cloud.user.entity.search;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户搜索历史表
 * </p>
 *
 * @author czg
 * @since 2022-07-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Table(comment = "用户搜索历史表")
public class SearchHistory implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true,isAutoIncrement = true)
    private Integer id;

    /**
     * 搜索内容
     */
    @Column(length = 20, comment = "搜索内容")
    private String search;

    /**
     * 用户id
     */
    @Column(comment = "用户id")
    private Integer userId;

    /**
     * 用户类型, 同登录类型
     */
    @Column(comment = "用户类型, 同登录类型")
    private Integer userType;

    /**
     * 搜索的子模块
     */
    @Column(length = 200, comment = "搜索的子模块")
    private String submodule;

    /**
     * 搜索的模块
     */
    @Column(length = 200, comment = "搜索的模块")
    private String modular;

    /**
     * 状态 1正常 -1删除
     */
    @Column(comment = "状态 1正常 -1删除")
    private Integer status;

    @Column(comment = "创建时间", defaultValue = "now()")
    private LocalDateTime createDate;


}
